<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>dianmin</title>
	<meta name="keyworlds" content="">
	<meta name="description" content="">
	<style>
		#c1{width:100%;height: 500px;background: #000;position: relative;}
		#c2{color: green;left: 50%;top:50px;position: absolute;cursor: pointer;font-size: 38px;}
		#c3{color: red;position: fixed;left: 50%;top: 40%;font-size: 52px;}
	</style>
</head>
<body>
	<div id="c1">
		<div id="c2">开始</div>
		<div id="c3"></div>
	</div>
	<script>
		var c2=document.getElementById('c2');
		var c3=document.getElementById('c3');
		var x=0;
		var time1=null;
		var arr=[
			'我',
			'是',
			'谁',
			'呀',
			'啊',
			'不',
			'知',
			'道',
		]
		c2.onclick=function(){
			if(x==0){
				time1=setInterval(function(){
					c3.innerHTML=arr[Math.floor(Math.random()*arr.length)];
				},10)
				c2.innerHTML='停止';
				x=1;
				
			}else if(x==1){
				clearInterval(time1);
				c2.innerHTML='停止';
				x=0;
			}
		}
	</script>
</body>
</html>